/*
 * Copyright 2008 Carnegie Mellon University
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, 
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package edu.cmu.lti.sepia.data;

import java.util.Locale;

/**
 * 
 * Enumerates supported source/target languages.
 * 
 * @author Hideki Shima
 *
 */
public enum Lang {
  AR(Locale.getDefault()), 
  BU(Locale.getDefault()), 
  EU(Locale.getDefault()), 
  BG(Locale.getDefault()), 
	CS(Locale.SIMPLIFIED_CHINESE), 
	CT(Locale.TRADITIONAL_CHINESE),
  DA(Locale.getDefault()), 
  NL(Locale.getDefault()), 
  EN(Locale.getDefault()), 
  FI(Locale.getDefault()), 
  FR(Locale.FRENCH), 
  DE(Locale.GERMANY), 
  EL(Locale.getDefault()), 
  HI(Locale.getDefault()), 
  ID(Locale.getDefault()), 
  IT(Locale.ITALIAN), 
  JA(Locale.JAPANESE), 
  KO(Locale.KOREAN), 
  LA(Locale.getDefault()), 
  MR(Locale.getDefault()), 
  ML(Locale.getDefault()), 
  FA(Locale.getDefault()), 
  PL(Locale.getDefault()), 
  PT(Locale.getDefault()), 
  PA(Locale.getDefault()), 
  RU(Locale.getDefault()), 
  ES(Locale.getDefault()), 
  SV(Locale.getDefault()), 
  TA(Locale.getDefault()), 
  TE(Locale.getDefault()), 
  TH(Locale.getDefault()), 
  TR(Locale.getDefault()), 
  VI(Locale.getDefault());
  
	private Locale locale;
	
	
	private Lang( Locale locale ) {
    this.locale = locale;
  }
	
	public Locale getLocale() {
	  return locale;
	}
	
	public boolean isSpaceSeparatedLanguage() {
	  return this.equals(Lang.EN)||this.equals(Lang.DA)
    ||this.equals(Lang.NL)||this.equals(Lang.FI)||this.equals(Lang.FR)
    ||this.equals(Lang.DE)||this.equals(Lang.EL)||this.equals(Lang.HI)
    ||this.equals(Lang.ID)||this.equals(Lang.IT)||this.equals(Lang.LA)
    ||this.equals(Lang.MR)||this.equals(Lang.ML)||this.equals(Lang.FA)
    ||this.equals(Lang.PL)||this.equals(Lang.PT)||this.equals(Lang.PA)
    ||this.equals(Lang.RU)||this.equals(Lang.ES)||this.equals(Lang.SV)
    ||this.equals(Lang.TA)||this.equals(Lang.TE)||this.equals(Lang.TR)
    ||this.equals(Lang.VI);
	}
}
